package com.antler.smt.admin.controller;

import com.antler.smt.admin.annotation.OperateCut;
import com.antler.smt.request.admin.RefundReq;
import com.antler.smt.response.base.Result;
import com.antler.smt.service.admin.RefundService;
import com.antler.smt.utils.LogUtil;
import com.antler.smt.validate.DataValidator;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


/**
 * 退款审核
 *
 * @author zhangyi
 * @date 2018-6-6 18:31:38
 */
@RestController
@RequestMapping(value = "/refundAudit")
@Api(description = "退款审核")
public class RefundAuditController {

    /**
     * 日志
     */
    private static Logger log = LogUtil.get();

    @Resource
    private RefundService refundService;

    /**
     * 申请退款
     *
     * @return
     */
    @PostMapping("/refundAuditRecord")
    @ApiOperation(value = "获取区域列表", httpMethod = "POST")
    @OperateCut(content = "申请退款")
    public Result refund(@RequestBody RefundReq refundReq) {
        Result result = null;

        DataValidator.isNull(refundReq,"请求实体不能为空！");
            result = refundService.refund(refundReq);
        return result;
    }
}
